package com.wdy.service.impl;

import java.util.List;

import com.wdy.dao.PostDao;
import com.wdy.po.Post;
import com.wdy.service.PostManager;

public class PostManagerImpl implements PostManager {

	private PostDao postDao;
	
	public void setPostDao(PostDao postDao) {
		this.postDao = postDao;
	}

	
	public void savePost(Post post) {
		postDao.save(post);
	}

	
	public void removePost(Post post) {
		postDao.delete(post);
	}

	
	public void updatePost(Post post) {
		postDao.attachDirty(post);
	}

	
	public List<Post> listAll() {
		return postDao.findAll();
	}

	
	public List<Post> findByDate(String value) {
		return postDao.findByDate(value);
	}



}
